﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using ThresholdAssistant.Enums;

namespace ThresholdAssistant.WebAPI.Models
{
    /// <summary>
    /// 短信发送记录记录表
    /// </summary>
    [Table("t_send_sms_record")]
    public class SendSmsRecord
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        [Key]
        [Column("id")]
        public long Id { get; set; }

        /// <summary>
        /// 短信类型（0互亿 1阿里云）
        /// </summary>
        [Column("type")]
        public SmsTypeEnum Type { get; set; }

        /// <summary>
        /// 来源（0预警 1通知）
        /// </summary>
        [Column("source")]
        public SmsSourceEnum Source { get; set; }

        /// <summary>
        /// 手机号码
        /// </summary>
        [Column("phone")]
        public string Phone { get; set; }

        /// <summary>
        /// 消息id
        /// </summary>
        [Column("sms_id")]
        public string SmsId { get; set; }

        /// <summary>
        /// 模版id
        /// </summary>
        [Column("template_id")]
        public string TemplateId { get; set; }

        /// <summary>
        /// 发送结果（1成功 0失败）
        /// </summary>
        [Column("status")]
        public RecordStatusEnum Status { get; set; }

        /// <summary>
        /// 发送返回结果集
        /// </summary>
        [Column("message")]
        public string Message { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("create_time")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column("update_time")]
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark")]
        public string Remark { get; set; }
    }
}
